.drawer-pusher
  = autosaving_form_for @post do |f|
    = render 'tenon/shared/default_form_toolbar', obj: @post

    %main
      = render 'tenon/shared/version_warning', obj: @post if @item_version

      = f.title_text_field :title, required: true

      = f.asset :cover_photo

      .panel-label Content
      .panel
        %ul.tabs
          %li.tabs__tab= link_to 'Content', '#content'
          - unless @categories.blank?
            %li.tabs__tab= link_to 'Categories', '#categories'
          %li.tabs__tab= link_to 'SEO', '#seo'

        .panel__content
          #content.tab-section
            = f.rich_text :excerpt, label: ''
            = f.tenon_content :content

          - unless @categories.blank?
            #categories.tab-section
              = f.select :post_category_ids, @categories.map { |c| [c.title, c.id] }, { label: 'Categories' }

          #seo.tab-section
            = render 'tenon/shared/seo_fields', f: f

      .panel-label Publication Details
      .panel.panel--padded
        .row
          .inner6
            = f.collection_select :user_id, @users, :id, :email, include_blank: "(No Author)", label: 'Author'
          .inner6.omega
            = f.date_time_picker :publish_at, label: 'Publish Date / Time'



      .spacer
